<?php
class AutoController extends AppController {

	var $name = 'Auto';
	var $helpers = array();

	var $components = array('Param', 'Init', 'Session');

	var $uses = array();

	var $login = null;

	function beforeFilter() {
		$this->layout = null;
		$this->Init->startup($this);
		$this->login = $this->Init->init();
	}



	function load_products() {
		$this->layout = null;
		$_provider = trim($_POST['product_type']);
		$this->loadModel('Product');
		$this->set('products', $this->Product->find('list', array(
			'conditions' => array(
				'type' => $_provider
			),
			'fields' => array('id','name_vie')
		)));
	}
}
?>